Play a sound

Aim

To play a sound file while carrying out a trial.

Procedure

1.Open the Windows Notepad and enter the following text:

@echo off

set soundFile="D:\Sound Files\Stimulus1.wav"

start "" "C:\Program Files\Windows Media Player\wmplayer.exe" %soundFile%

Replace the text within quotes with the actual path to your sound file.

2.Save the file with the *.bat extension.

3.Follow the procedure in External commands to create an External Command action that selects the batch file.

inset_5200248.jpg 

4.Place the External command box in the Trial Control rule.

Notes

Create one batch file for each sound file you want to play during the trial. Create multiple External command actions, one for each batch file, and place them in the Trial Control rule.

wmplayer represents Windows Media Player. You can also use other software to play video, for example VLC.

@echo off

set soundFile="D:\Sound files\Stimulus1.wav"

start "" "C:\Program Files\VideoLAN\VLC\vlc.exe" --play-and-exit %soundFile%

For examples of the Command line options, see External Commands in the EthoVision XT 19 - Trial and Hardware Control - Reference Manual.

See also

External commands